<?php

namespace App\Enums;

class GiftTypeEnum
{
    static public function getGiftType($key = '')
    {
        if (env('APP_ENV') == 'local') { //区分线上与线下环境的 gift_type表
            $giftTypes = [
                'happy'             => 52, //欢乐大作战
                'ad_astra'          => 50, //星际探险
                'star_wishing'      => 36, //星之许愿池
                'huoke'             => 27, //霍克游戏
                'letter'            => 26, //信物类
                'activity'          => 25, //活动类
                'special'           => 24, //特殊类
                'general'           => 23, //普通类
                'star_week_three'   => 17, //周星榜第三名
                'star_week_two'     => 16, //周星榜第二名
                'star_week_one'     => 15, //周星榜第一名
                'candies'           => 14, //抢糖果
                'gold_magic_box'    => 13, //金魔盒
                'cuprum_blind_box'  => 9, //铜盲盒
//                'magic_gift_config' => 8, //魔盒礼物配置
                'magic_gift_config' => [100,101,102,103], //魔盒礼物配置
                'cuprum_magic_box'  => 7, //铜魔盒
                'boss_combat'       => 6, //boss大作战
                'silver_magic_box'  => 5, //银魔盒
                'cuprum_magic_box2' => 4, //铜魔盒2
                'gift_backpacker'   => 3, //礼包礼物
                'tree_gift'         => 2, //许愿树礼物
                'room_gift'         => [1, 37], //房间礼物 + 周星礼物
            ];
        } else { //生产环境
            $giftTypes = [
                'happy'             => 52, //欢乐大作战
                'ad_astra'          => 50, //星际探险
                'star_wishing'      => 36, //星之许愿池
                'huoke'             => 30, //霍克游戏
                'qipaolin'          => 29, //气泡令
                'grade'             => 28, //评分礼物
                'auction'           => 27, //拍卖房
                'activity'          => 25, //活动类
                'special'           => 24, //特殊类
                'general'           => 23, //普通类
                'star_week_three'   => 17, //周星榜第三名
                'star_week_two'     => 16, //周星榜第二名
                'star_week_one'     => 15, //周星榜第一名
                'candies'           => 14, //抢糖果
                'gold_magic_box'    => 13, //金魔盒
                'cuprum_blind_box'  => 9, //铜盲盒
//                'magic_gift_config' => 8, //魔盒礼物配置
                'magic_gift_config' => [100,101,102,103], //魔盒礼物配置
                'cuprum_magic_box'  => 7, //铜魔盒
                'boss_combat'       => 6, //boss大作战
                'silver_magic_box'  => 5, //银魔盒
                'cuprum_magic_box2' => 4, //铜魔盒2
                'gift_backpacker'   => 3, //礼包礼物
                'tree_gift'         => 2, //许愿树礼物
                'room_gift'         => [1, 37], //房间礼物
            ];
        }
        if ($key) {
            return $giftTypes[$key] ?? 0;
        } else {
            return $giftTypes;
        }
    }
}
